PATHMac OS 8 and 9 Developer Documentation > Human Interface Toolbox > Menu Manager >

Mac OS 8.5 Menu Manager Reference


DisableMenuItem

Disables a menu item or a menu.

pascal void DisableMenuItem (
                     MenuHandle theMenu,
                     UInt16 item);
theMenu
A value of type MenuHandle . Pass a handle to the menu containing the item to be disabled.
item
An unsigned 16-bit integer. Pass a value specifying the item number of the menu item that you wish to disable. Pass 0 to specify the menu title and thereby disable the entire menu.

DISCUSSION

The DisableMenuItem function disables a menu item (and any associated icon) so that the user cannot choose the item from the menu. Unlike the pre-Mac OS 8.5 Menu Manager function DisableItem , the DisableMenuItem function can disable individual menu items with item numbers greater than 31.

If your application disables a menu title using DisableMenuItem , it should then call either the DrawMenuBar function or the InvalMenuBar function to update the menu bar's appearance.


VERSION NOTES

Available with Mac OS 8.5 and later.


SEE ALSO

The function EnableMenuItem .

The function IsMenuItemEnabled .


© 1999 Apple Computer, Inc. — (Last Updated 19 Jan 99)